'use strict';

const Controller = require('egg').Controller;
class GetController extends Controller {
  async user() {
    const { ctx, app } = this;
    const users = await app.mysql.select('egg_test');
    // const name = await app.mysql.get('egg_test', { id: 1 });
    ctx.body = { data: users };
    ctx.status = 200;
  }

  async create() {
    const { ctx, app } = this;
    const users = await app.mysql.select('egg_test');
    // const name = await app.mysql.get('egg_test', { id: 1 });
    ctx.body = { data: users };
    ctx.status = 200;
  }
}
module.exports = GetController;
